<?php
namespace User\Controller;
use Common\Controller\MemberbaseController;
class ZujiController extends MemberbaseController {
	
	
	protected $db;
	function _initialize(){
		parent::_initialize();
		$this->db=M("UserZuji");
	}

	
	function index(){


		if(IS_POST){

		$map [uid] = $this->u[id];


		$count = $this->db->where ( $map )->count ();
		$page = $this->page ( $count, 15 ,I("post.page"));
		$data = $this->db->where ( $map )->limit ( $page->firstRow . ',' . $page->listRows )->order ( array (

			"id" => "DESC"
		) )->select ();


		foreach($data as $k=>$v){

			$info=D("Product")->where(array("id"=>$v["product_id"]))->field('id,title,thumb,price')->find();


			if($info){
				$info["l_id"]=$v["id"];
				$list[]=$info;


			}






		}


			$this->ajaxReturn($list);

			}
		else{
			$this->assign ( "seo_title",  "我的足迹" );
			$this->display ();

		}







	}
	

	

}